package org.jeecg.modules.yinsheng.command.division;

import org.jeecg.modules.yinsheng.annotation.Length;
import org.jeecg.modules.yinsheng.annotation.NotBlank;
import org.jeecg.modules.yinsheng.annotation.Pattern;
import org.jeecg.modules.yinsheng.command.base.BaseDivisionReqCommand;

/**
 * @ClassName DivisionRefundReqCommand
 * @Description 分账退款
 * @Author linxl
 * @Date 2021/6/4 17:21
 * @Version 1.0
 */

public class DivisionRefundReqCommand extends BaseDivisionReqCommand<DivisionRefundReqCommand> {
	private static final long serialVersionUID = -1544153500186899524L;

	// 退款订单号
	@NotBlank(message = "退款订单号不能为空")
	@Length(max = 32, message = "退款订单号最大长度不能超过32个字符")
	private String refundOrderNo;

	// 交易日期，格式yyyyMMdd
	@NotBlank(message = "交易日期不能为空")
	@Length(min = 8, max = 8, message = "交易日期格式不规范")
	private String tranDate;

	// 退款金额，20长度位，保留2位小数，退款金额与原订单金额保持一致，只支持全额退款
	@NotBlank(message = "退款金额不能为空")
	@Pattern(regexp = "^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$", message = "交易金额格式不正确")
	private String refundAmount;

	// 退款原因
	private String refundReason;

	// 通知商户的ur， 只有当天退款的有通知
	@NotBlank(message = "通知地址不能为空")
	private String backUrl;

	// 线上交易码(长度5),仅支持原订单交易类型为S3007、S3106、S3107进行退款 (必填)
	@NotBlank(message = "线上交易码不能为空")
	private String msgCode;

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getRefundOrderNo() {
		return refundOrderNo;
	}

	public DivisionRefundReqCommand setRefundOrderNo(String refundOrderNo) {
		this.refundOrderNo = refundOrderNo;
		return this;
	}

	public String getTranDate() {
		return tranDate;
	}

	public DivisionRefundReqCommand setTranDate(String tranDate) {
		this.tranDate = tranDate;
		return this;
	}

	public String getRefundAmount() {
		return refundAmount;
	}

	public DivisionRefundReqCommand setRefundAmount(String refundAmount) {
		this.refundAmount = refundAmount;
		return this;
	}

	public String getRefundReason() {
		return refundReason;
	}

	public DivisionRefundReqCommand setRefundReason(String refundReason) {
		this.refundReason = refundReason;
		return this;
	}

	public String getBackUrl() {
		return backUrl;
	}

	public DivisionRefundReqCommand setBackUrl(String backUrl) {
		this.backUrl = backUrl;
		return this;
	}

	public String getMsgCode() {
		return msgCode;
	}

	public DivisionRefundReqCommand setMsgCode(String msgCode) {
		this.msgCode = msgCode;
		return this;
	}

}
